package com.study.ming.shejimoshi.chain;

public class ChainDemo {

	public static void main(String[] args) {
		AbstractLoggor consoleLoggor = new ConsoleLoggor(3);
		AbstractLoggor errorLoggor = new ErrorLoggor(2);
		FileLoggor fileLoggor = new FileLoggor(1);
		errorLoggor.setNextLoggor(fileLoggor);
		consoleLoggor.setNextLoggor(errorLoggor);

		consoleLoggor.logMsg(1,"huhuh");
		System.out.println("------------");
		consoleLoggor.logMsg(2,"huhuh");
		System.out.println("------------");
		consoleLoggor.logMsg(3,"huhuh");
	}

}
